package config

import (
	"Gin/global/model"
	"fmt"
	"github.com/spf13/viper"
)

func AppConfigRead() {
	viper.SetConfigFile("./config/App.yaml")
	err := viper.ReadInConfig()
	if err != nil {
		panic(err)
		return
	}
	err = viper.Unmarshal(&model.AppConfig)
	if err != nil {
		panic(err)
		return
	}
	fmt.Println(model.AppConfig)
}
